

<script type="text/javascript" src="<?= base_url(); ?>assets/js/libs/jquery.freeow.min.js"></script>
<script type="text/javascript" src="<?= base_url(); ?>assets/js/libs/jquery.dropdownized.min.js"></script>
<script type="text/javascript" src="<?= base_url(); ?>assets/js/libs/jquery.numeric.js"></script>
<script src="<?= base_url(); ?>assets/js/libs/jquery.easing.1.3.js"></script>
<script src="<?= base_url(); ?>assets/js/libs/jquery.bxslider.min.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]><script type="text/javascript" src="<?= base_url(); ?>assets/js/libs/selectivizr-min.js"></script><![endif]-->
<script src="<?= base_url() ?>assets/js/libs/jquery.validate.js" type="text/javascript"></script>
<script src="<?= base_url() ?>assets/js/libs/jquery.busy.js" type="text/javascript"></script>
<script src="<?= base_url() ?>assets/js/shared.js" type="text/javascript"></script>
<script src="<?= base_url() ?>assets/js/api/form.js" type="text/javascript"></script>

<?php
    switch ($this->router->method) {

        case 'index':
            ?>
            <!--<script src="<?= base_url() ?>assets/js/dates.js" type="text/javascript"></script>-->
            <!--<script src="<?= base_url() ?>assets/js/childrens.js" type="text/javascript"></script>-->
            <?php
            break;

        case 'search':
            ?>
            <script src="<?= base_url() ?>assets/js/libs/jquery.colorbox-min.js" type="text/javascript"></script>
            <script src="<?= base_url() ?>assets/js/libs/jquery.loadmask.min.js" type="text/javascript"></script>
            <script src="<?= base_url() ?>assets/js/libs/underscore-min.js"></script>
            <script src="<?= base_url() ?>assets/js/libs/jquery.multi-accordion-1.5.3.js"></script>
            <script src="<?= base_url() ?>assets/js/libs/jquery.scrollTo-min.js"></script>
            <script src="<?= base_url() ?>assets/js/api/filter.js" type="text/javascript"></script>

            <?php
            break;

        case 'accommodation':
            ?>

            <script src="<?= base_url() ?>assets/js/libs/jquery.jcarousel.min.js"></script>
            <script src="<?= base_url() ?>assets/js/libs/jquery.pikachoose.min.js"></script>
            <script src="<?= base_url() ?>assets/js/libs/jquery.colorbox-min.js" type="text/javascript"></script>
            <script src="<?= base_url() ?>assets/js/hotel-details.js" type="text/javascript"></script>
            <?php
            break;
    }
?>

<script type="text/javascript">

// Add a script element as a child of the body
    function downloadJSAtOnload() {

        loadGMAPScript = function() {
            var element1 = document.createElement("script");
            element1.src = API.Data.base_url + "assets/js/api/google_map.js";
            document.body.appendChild(element1);

        }

        var element = document.createElement("script");
        element.type = "text/javascript";
        element.src = "http://maps.googleapis.com/maps/api/js?key=AIzaSyA8S8GdXphRexN5dRL-A5o4GDvBqMFx-iI&sensor=false&callback=loadGMAPScript";
        document.body.appendChild(element);

    }

    $(window).load(function() {
        downloadJSAtOnload();
    });


</script>

<script src="<?= base_url() ?>assets/js/init.js" type="text/javascript"></script>